<template>
    <view class="page-box">
        <view class="bg">
            <template v-if="type == 1">
                <image src="/static/关于小郎.png" mode="widthFix" class="responsive-image"></image>
            </template>
            <template v-else-if="type == 2">
                <image src="/static/联系地址.png" mode="widthFix" class="responsive-image"></image>
            </template>
            <template v-else-if="type == 3">
                <image src="/static/平台拓客.png" mode="widthFix" class="responsive-image"></image>
            </template>
            <template v-else-if="type == 4">
                <image src="/static/如何注册.png" mode="widthFix" class="responsive-image"></image>
            </template>
            <template v-else-if="type == 5">
                <image src="/static/佣金结算.png" mode="widthFix" class="responsive-image"></image>
            </template>
            <template v-else-if="type == 6">
                <image src="/static/问一问.png" mode="widthFix" class="responsive-image"></image>
            </template>
        </view>
    </view>
</template>


<script>
    export default {
        data() {
            return {
                type: ''
            };
        },
        onLoad(options) {
            this.type = options.type || '';
            this.updateTitle();
        },
        onShow() {

        },
        methods: {
            updateTitle() {
                let title = '';
                switch (this.type) {
                    case '1':
                        title = '关于小朗';
                        break;
                    case '2':
                        title = '联系地址';
                        break;
                    case '3':
                        title = '平台拓客';
                        break;
                    case '4':
                        title = '如何注册';
                        break;
                    case '5':
                        title = '佣金结算';
                        break;
                    case '6':
                        title = '问一问';
                        break;
                    default:
                        title = '小朗优创';
                }
                uni.setNavigationBarTitle({
                    title: title
                });
            }
        }
    };
</script>

<style scoped lang="scss">
    .page-box {
        width: 100%;

        .bg {
            width: 100%;

            .responsive-image {
                width: 100%;
                height: auto;
            }
        }
    }
</style>